package edu.java.homework.hw11.join.solution.actors;

import edu.java.homework.hw11.join.solution.dish.Dish;


public class Client extends Actor {
	Thread joinThread=null;

	public Client(String name, Dish dish, Thread joinThread) {
		super(name, dish);
		this.joinThread= joinThread;
	}
	
	
	public Client(String name, Dish dish) {
		super(name, dish);
	}

	@Override
	public void run() {
		// super.run();
		System.out.println(Thread.currentThread().getName() + " starts...");

		getDish().eatDish(joinThread);
	}
}
